﻿cmake_minimum_required (VERSION 2.8)
project(test)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O0 -Wall -g -ggdb")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")

find_package(Threads REQUIRED)

find_package( Boost REQUIRED )
include_directories( ${Boost_INCLUDE_DIRS} )

find_package(YAML-CPP)
include_directories( ${YAML-CPP_INCLUDE_DIRS} )

## [discover_ogre]
# specify which version you need
find_package(OGRE REQUIRED)

# find_package(Qt5)

# the search paths
include_directories(${OGRE_INCLUDE_DIRS})
link_directories(${OGRE_LIBRARY_DIRS})

include_directories(include)

# copy essential config files next to our binary where OGRE autodiscovers them
file(COPY ${OGRE_CONFIG_DIR}/plugins.cfg ${OGRE_CONFIG_DIR}/resources.cfg
     DESTINATION ${CMAKE_BINARY_DIR})
## [discover_ogre]

add_executable(test src/Bootstrap.cpp)
target_link_libraries(test ${OGRE_LIBRARIES})

###编译可执行文件
add_executable( concurrent src/concurrent.cpp )
target_link_libraries(concurrent Threads::Threads)

add_executable( test_boost_shared src/test_boost_shared.cpp )

add_executable( convert src/convert.cpp )

add_executable( cplusplus_base src/cplusplus_base.cpp )